package main

import (
	"fmt"
)

func main() {
	var a []int
	fmt.Println(a) //[]

	b := [10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}
	fmt.Println(b)

	fmt.Println(b[5:10])

	fmt.Println(b[5:])

	c := make([]int, 3, 10) //长度为3，最大长度为10
	fmt.Println(c)

	d := make([]int, 3)
	fmt.Println(d)

	e := [...]byte{'a', 'b', 'c', 'd', 'e', 'f', 'g'}
	ee := e[3:7]
	ef := e[2:4]
	fmt.Println(string(ee))
	fmt.Println(string(ef))
	eee := append(ee, 'a', 'b')
	fmt.Println(string(eee))
}
